<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
     /* 1-10的和 */
     /*   var sum=0;
       for(let i=1;i<=10;i++){
           sum+=i;
       }
       console.log(sum); */

       /* 获取数组中最大的值 */
     /*    var arr=[22,12,11,99,33];
       var max=arr[0];
       for(let i=1;i<arr.length;i++){
           if(max<arr[i]){
               max=arr[i];
           }
       }
       console.log(max); */
   
      /* 对数组遍历 每一项*2 */

       var arr_two=[22,33,12,25];
        for(i=0;i<arr_two.length;i++){
            console.log(arr_two[i]*2);
        } 
    </script>
</body>
</html>